checkout: Fix file descriptor leak for copying checkouts
authorColin Walters <walters@verbum.org>
Wed, 11 Sep 2013 14:58:22 +0000 (10:58 -0400)
committerColin Walters <walters@verbum.org>
Wed, 11 Sep 2013 14:58:22 +0000 (10:58 -0400)
Hardlink checkouts didn't hit this, but we need to close the input
stream.

src/libostree/ostree-repo-checkout.c

index 2d6c51413c8a6b58b1dcace1c20844432dcab3e6..437e309960dd9e496cdb54bef3aecca432bad937 100644 (file)
@@ -502,6 +502,9 @@ checkout_one_file_at (OstreeRepo                        *repo,
               goto out;
             }
         }
+
+      if (!g_input_stream_close (input, cancellable, error))
+        goto out;
     }
 
   ret = TRUE;